home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-29 | 7.4 KB | 122 lines | [TEXT/KAHL] |
- $$Message User Common, u:common$Prototype.name$.h
- $$File u:common$Prototype.name$.h
- /* common$Prototype.name$ Common */
- /* $CopyRight$ */
-
- /*
- File name: common$Prototype.name$.h
- Function: Common variables for program specific code.
- History: $Date$ Original by $Author$
-
- */
-
- /* ======================================================= */
- /* ======================================================= */
-
- /* NOTE : FormatRevision MUST be first in the record, and always a short */
- typedef struct PrefsRec{ /* Preferences Record definition */
- /* ALWAYS KEEP FormatRevision AS THE FIRST ELEMENT IN THIS RECORD */
- short FormatRevision; /* FIRST ALWAYS, Change each time the format changes */
- WindowLocRec theWindowLocRec; /* For saving window positions */
-
- /* Add other preference variable definitions after this line */
-
- }PrefsRec,*PrefsPRec,**PrefsHRec;
-
- /* ======================================================= */
- /* ======================================================= */
- $$CloseFile
- $$Message User Common, u:common$Prototype.name$.c
- $$File u:common$Prototype.name$.c
- /* common$Prototype.name$ Common */
- /* $CopyRight$ */
-
- /*
- File name: common$Prototype.name$.c
- Function: Common variables for program specific code.
- History: $Date$ Original by $Author$
-
- */
-
-
- #include "mmCommon$Prototype.name$.h" /* Common */
- #include "common$Prototype.name$.h" /* Common */
-
- /* ======================================================= */
- /* ======================================================= */
-
- #define PrefsCreator 'xxxx' /* Creator, this has to be the same as your App */
- #define PrefsType 'Pref' /* Type, this has to match the type in your BNDL */
- #define PrefsFileName "\p$Prototype.name$ Prefs" /* This is the name of your prefs file */
-
- #define PrefsFormatRevision 1 /* Change each time the format changes */
-
- /* ======================================================= */
-
- /* Routine: U_InitPreferences */
- /* Purpose: Set the default preferences */
-
- void U_InitPreferences(void)
- {
-
- }
-
- /* ======================================================= */
-
- /* Routine: U_GetPrefParams */
- /* Purpose: Get the preferences Parameters */
-
- void U_GetPrefParams(OSType *PrefCreator,OSType *PrefType,Str255 *thePrefsFilename,long *PrefsRecSize,short *thePrefsFormatRevision)
- {
-
- *PrefCreator = PrefsCreator;
- *PrefType = PrefsType;
- PStrCopy((Str255 *)PrefsFileName,thePrefsFilename);
- *PrefsRecSize = sizeof(PrefsRec);
- *thePrefsFormatRevision = PrefsFormatRevision;
- }
-
- /* ======================================================= */
-
- /* Routine: U_ReadPrefsPrivate */
- /* Purpose: Read the prefs ourselves */
-
- void U_ReadPrefsPrivate(short PrefsRefNum)
- {
-
- }
-
- /* ======================================================= */
-
- /* Routine: U_GetPreferences */
- /* Purpose: Get the preferences from the Prefs record already read in */
-
- void U_GetPreferences(Handle thePrefsH)
- {
- PrefsHRec thePrefs;
-
-
- thePrefs = (PrefsHRec)thePrefsH;
- theWindowLocRec = (*thePrefs)->theWindowLocRec; /* Get the window location data */
-
- /* Use the form: